package mc.domain;


public class Alergen_na_karcie {
	private int id;
	private String opis;
	private AlergenGrupa grupa;
	private String numer;
	private int id_ze_slownika;
	private float srednica;
	private float pole;
	private int version;
	
	public Alergen_na_karcie(Alergen a) {
		super();
		this.opis = a.getOpis();
		this.grupa = a.getGrupa();
		this.numer = a.getNumer();
		this.id_ze_slownika = a.getId();
	}
	
	public int getId_ze_slownika() {
		return id_ze_slownika;
	}

	public void setId_ze_slownika(int id_ze_slownika) {
		this.id_ze_slownika = id_ze_slownika;
	}

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public String getOpis() {
		return opis;
	}
	public void setOpis(String opis) {
		this.opis = opis;
	}
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	public AlergenGrupa getGrupa() {
		return grupa;
	}
	public void setGrupa(AlergenGrupa grupa) {
		this.grupa = grupa;
	}
	public String getNumer() {
		return numer;
	}
	public void setNumer(String numer) {
		this.numer = numer;
	}
	public float getSrednica() {
		return srednica;
	}
	public void setSrednica(float srednica) {
		this.srednica = srednica;
		float promien = srednica /2; 
		pole = (float) (3.14 * promien * promien);
	}
	public float getPole() {
		return pole;
	}
	public void setPole(float pole) {
		this.pole = pole;
	}

	@Override
	public String toString() {
		return opis;
	}
	
	

}
